<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: rgb(61, 43, 226);
        }
        button{
            width: 100px;
            height: 100px;
            background-color: blueviolet;
        }
        div:active{
            background-color: chartreuse;
        }
        button:active{
            background-color: brown;
        }
    </style>
</head>

<body>
    <div>
        99
    </div>
    <button>按钮</button>
</body>

</html>